//
//  UINavigationController+CustomAnimation.m
//  PantaKill
//
//  Created by 湛凯杰 on 16/7/29.
//  Copyright © 2016年 湛凯杰. All rights reserved.
//

#import "UINavigationController+CustomAnimation.h"

@implementation UINavigationController (CustomAnimation)
- ( void )customPushViewController:( UIViewController *)viewController

{
    
    viewController.view.frame=(CGRect){-viewController.view.frame.size.width,0, viewController. view . frame . size };
    
    [self.topViewController.view addSubview:viewController.view];
    
    [UIView animateWithDuration :.35f
     
                animations :^{
                viewController.view.frame = (CGRect){0,0,self.view.bounds.size};
                       }];
    
}

@end
